home *** CD-ROM | disk | FTP | other *** search
/ Aminet 24 / Aminet 24 (1998)(GTI - Schatztruhe)[!][Apr 1998].iso / Aminet / dev / c / AmiVoGL_MDEV.lha / examples / fsinwave.F < prev    next >
Text File  |  1991-09-23  |  836b  |  66 lines

  1.     program sine
  2.  
  3. #ifdef SGI
  4. #include "fgl.h"
  5. #include "fdevice.h"
  6. #else
  7. #include "fvogl.h"
  8. #include "fvodevice.h"
  9. #endif
  10.  
  11.     parameter(PI = 3.141592653589)
  12.     integer *2 val
  13.     real v(0:1)
  14.  
  15.     step = PI / 180.0
  16.  
  17.     call winope('bgnline/endline test', 20)
  18.     call unqdev(INPUT)
  19.     call qdevic(KEYBD)
  20.  
  21.     call color(BLACK)
  22.     call clear
  23.     call ortho2(-0.5, 2 * PI + .5, -1.5, 1.5)
  24.  
  25.     call color(GREEN)
  26.     call bgnlin
  27.         v(0) = -0.5
  28.         v(1) = 0.0
  29.         call v2f(v)
  30.  
  31.         v(0) = 2 * PI + .5
  32.         v(1) = 0.0
  33.         call v2f(v)
  34.     call endlin
  35.  
  36.     call color(RED)
  37.     call bgnlin
  38.         v(0) = 0.0
  39.         v(1) = -1.3
  40.         call v2f(v)
  41.  
  42.         v(0) = 0.0
  43.         v(1) = 1.3
  44.         call v2f(v)
  45.     call endlin
  46.  
  47.  
  48.     call color(YELLOW)
  49.     call bgnlin
  50.         v(0) = 0.0
  51.         v(1) = 0.0
  52.         call v2f(v)
  53.  
  54.         do 10 a = 0.0, 2 * PI, step
  55.             v(0) = a
  56.             v(1) = sin(a)
  57.             call v2f(v)
  58. 10        continue
  59.     call endlin
  60.  
  61.     idum = qread(val)
  62.  
  63.     call gexit 
  64.  
  65.     end
  66.